Systems and methods for detecting defects in printed solder paste

ABSTRACT

A method of inspecting a stencil having apertures through which a substance is deposited onto an electronic substrate includes depositing the substance through the stencil and onto the substrate, capturing a first image of the stencil after the deposit of the substance and detecting variations in texture of the substance in the first image, capturing a second image of the electronic substrate having the substance on its surface and detecting variations in texture of the substance in the second image, defining a region of interest in the first image and in the second image to determine whether at least one feature exists in the region of interest, measuring a first span of the at least one feature in the region of interest in the first image and a second span of the at least one feature in the region of interest in the second image, and correlating the first span of the at least one feature and the second span of the at least one feature to determine whether a threshold span of the at least one feature has been reached.

CLAIM OF PRIORITY

[0001] This application is a continuation-in-part of U.S. patentapplication Ser. No. 10/734,395, filed Dec. 12, 2003, which is acontinuation-in-part of U.S. patent application Ser. No. 09/304,699,entitled “A Method and Apparatus for Inspecting Solder Paste Deposits onSubstrates”, filed May 4, 1999, the contents of each of which areincorporated herein by reference in their entirety.

FIELD OF THE INVENTION

[0002] Embodiments of the invention generally relate to devices,systems, and methods used in machine vision systems. More particularly,the invention relates to systems and methods for detecting defects inthe solder paste print process.

BACKGROUND OF THE INVENTION

[0003] In typical surface-mount circuit board manufacturing operations,a stencil printer is used to print solder paste onto a circuit board.Typically, a circuit board having a pattern of pads or some other,usually conductive, surface onto which solder paste will be deposited isautomatically fed into the stencil printer and one or more small holesor marks on the circuit board, called fiducials, is used to properlyalign the circuit board with the stencil or screen of the stencilprinter prior to the printing of solder paste onto the circuit board. Insome prior art systems, an optical alignment system is used to align thecircuit board with the stencil. Examples of optical alignment systemsfor stencil printers are described in U.S. Pat. No. 5,060,063, issuedOct. 21, 1991 to Freeman, and in U.S. Pat. Re. 34,615 issued Jan. 31,1992, also to Freeman, each of which is incorporated herein byreference.

[0004] The solder paste print operation can be a primary source ofdefects in surface mount assembly. Thus, processes have been developedto inspect a substrate after solder paste has been deposited thereon todetermine whether the solder paste has been properly applied toconductive pads located on the substrate, usually, but not limited to,conduction pads on a printed circuit board. For example, in some priorart systems, the optical alignment system mentioned above also includesa vision inspection system to inspect the substrate.

[0005] Automated machine-based techniques for assessing print defects,however, are only able to isolate and quantify tangible characteristics.Reliable methods are still needed to classify and weigh the significanceof print defects as they relate to the process, to provide meaningfuloutput and to define realistic and useful process limits. Althoughsubsequent processes certainly play a part in determining the quality ofthe final printed circuit board (PCB assembly), detection and accurateassessment of bridge and other defects, as printed, can provide the mostdirect feedback for process control of appropriate print functions.

SUMMARY OF THE INVENTION

[0006] The existence of solder paste spanning a gap between adjacentpads, by itself, does not guarantee that a bridge-related defect willoccur later in the assembly process. Not all bridges or bridge-likedefects have the necessary mass or geometry to adversely affect a givenprocess. Conversely, gap defects that actually are significant to aprocess may not always connect adjacent pads to form a well-definedbridge. It has been found that the significance of paste-in-gap defectsis affected by factors such as the total amount of paste forming abridge or “bridge-like” feature, the geometry of a paste feature (e.g.,length, width, proportions), and the total amount of paste in a gap,regardless of its geometry.

[0007] In at least one embodiment, the invention provides systems andmethods that can provide improved detection of solder paste defects suchas bridges, to improve print process control. In this embodiment, thesystems and methods of the invention operate on a premise that not allbridge or “bridge-like” defects have the necessary mass or geometry toadversely affect a given process, and gap defects that are significantdon't always connect adjacent pads to form a bridge. Although subsequentprocesses also play a part in determining the quality of the finalassembly, detection and accurate assessment of bridge and other defects,as printed, can, in at least one embodiment, provide direct feedback forprocess control of appropriate print functions.

[0008] In one embodiment, the invention provides a method for analyzinggap defects that provides reliable measurements of paste-in-gap area(length times width) and detects significant geometry and span ofbridge-like paste features as they relate to the SMT (surface mounttechnology) assembly process. The total amount of paste in a gap and theeffective span of bridge-like features across the gap are used togetherto determine the probability that a specific paste feature will cause abridge-related defect.

[0009] In one embodiment the invention is directed to a method ofanalyzing an image of a substance deposited onto a substrate, the imagecomprising a plurality of pixels. The method includes defining a regionof interest in the image, associating the region of interest with firstand second perpendicular axis, wherein a set of pixels in the image liealong the first axis, converting the pixels in the region of interest toa single dimensional array aligned with the first axis and projectingalong the second axis, and applying at least one threshold to the singledimensional array, the threshold based at least in part on apredetermined limit.

[0010] Embodiments of the invention can include one or more of thefollowing features. The method can include smoothing the singledimensional array. The method can further include the steps ofcomputing, for each pixel along the first axis, a sum of all the pixelsin the region of interest that are in perpendicular alignment with therespective pixel along the axis, and representing the sums of each pixelalong the axis as a single dimensional array perpendicular to the secondaxis.

[0011] Embodiments of the invention can further include the steps oflocating an axis substantially near one edge of the region of interest,wherein a set of pixels in the image lie along the axis and evaluatingthe single dimensional array to determine whether any features exist inthe region of interest. The features can include defects, shortcircuits, bridge-like features, bridges, excess quantities of thesubstance, stray areas of the substance, and poorly defined areas of thesubstance.

[0012] Other embodiments of the method of the invention includereceiving at least one detection parameter, the detection parameterrelating to determining the likelihood that the at least one feature inthe image could later result in a functional defect. The step ofevaluating can be accomplished in accordance with the at least onedetection parameter. A further embodiment of the invention can includecomputing, for each feature in the region of interest, the area andgeometry of the feature, the computation accomplished at least in partusing the detection parameter and the single dimensional array. Stillfurther embodiments can include the step of determining, based on thearea and geometry, the likelihood that the at least one feature in theimage could later result in a functional defect.

[0013] Embodiments of the invention can include stencils as thesubstrates and an electrical material as the substance. Otherembodiments of the invention can include a substance that comprisessolder paste. The image can be comprised of a digitized image.

[0014] Implementations of the invention can include a method ofinspecting a stencil through which a substance is deposited onto anelectronic substrate. The method includes depositing the substancethrough the stencil onto the substrate, capturing an image of thestencil and of the substrate, detecting variations in texture in theimage to determine a location of the substance on the stencil and on thesubstrate, defining a region of interest in the image, the definedregion of interest having a first axis, wherein a set of pixels in theimage lie along the axis, computing, for each pixel along the axis, asum of all the pixels in the region of interest that are inperpendicular alignment with the respective pixel along the axis,representing the sums of each pixel along the axis as a singledimensional array perpendicular to the axis, and evaluating the singledimensional array to determine whether any features exist in the regionof interest.

[0015] Other implementations of the invention include a system fordispensing solder paste at predetermined locations on a substrate. Themethod comprises a dispenser that dispenses material on the substrate, acontroller for maintaining the operations of the dispenser, and aprocessor in electrical communication with the controller of theprocessor. The processor is programmed to perform texture-basedrecognition of a solder paste deposit located on the substrate, define aregion of interest within the image of solder paste, the defined regionof interest having a first axis, wherein a set of pixels in the imagelie along the axis, compute, for each pixel along the axis, a sum of allthe pixels in the region of interest that are in perpendicular alignmentwith the respective pixel along the axis, represent the sums of eachpixel along the axis as a single dimensional array perpendicular to theaxis, and evaluate the single dimensional array to determine whether anydefects exist in the region of interest.

[0016] Still further implementations of the invention are directed to amethod of detecting a defect in a substance deposited on a substrate.The method includes capturing an image of the substrate, detectingvariations in texture in the image to determine a location of thesubstance on the substrate, defining a region of interest in the image,the defined region of interest having a first axis, wherein a set ofpixels in the image lie along the axis, computing, for each pixel alongthe axis, a sum of all the pixels in the region of interest that are inperpendicular alignment with the respective pixel along the axis,representing the sums of each pixel along the axis as a singledimensional array perpendicular to the axis, and evaluating the singledimensional array to determine whether any defects exist in the regionof interest.

[0017] Embodiments of the invention can include one or more of thefollowing features. The substance can be solder paste. The defect cancomprise at least one of a solder bridge, bridge-like feature, or excesspaste feature. The substrate can include first and second pads ontowhich the solder is deposited and the defect can comprise the existenceof solder paste spanning at least a portion of the distance between thefirst and second pads. The method can further comprise applying a ruleto determine whether the defect should be classified as a solder bridge.

[0018] Details relating to this and other embodiments of the inventionare described more fully herein.

BRIEF DESCRIPTION OF THE FIGURES

[0019] The advantages and aspects of the present invention will be morefully understood in conjunction with the following detailed descriptionand accompanying drawings, wherein:

[0020]FIG. 1A provides a front view of a stencil printer in accordancewith one embodiment of the present invention;

[0021]FIG. 1B is a schematic of another embodiment of the presentinvention;

[0022]FIGS. 2A-2B is a schematic of a printed circuit board;

[0023]FIG. 2C is a schematic of a stencil used in printing circuitboards;

[0024]FIG. 2D is a schematic of a printed circuit board;

[0025]FIG. 2E is a representation of experimental results from a systemwithout a bridge prevention technique of one embodiment of theinvention;

[0026]FIG. 2F is a schematic of a stencil having solder paste deposits;

[0027]FIG. 2G is a representation of experimental results from a systemutilizing the bridge prevention technique of one embodiment of theinvention;

[0028]FIG. 3 is a flowchart of the method for inspecting solder pastedeposits on a substrate;

[0029]FIGS. 4A-4B is a schematic of various regions within a processorthat utilizes the method of the invention;

[0030]FIGS. 5A-5C is a representation of various filters typically usedin the method of the invention;

[0031]FIG. 6 is a flowchart of a method that implements an automaticgain offset feature of the invention;

[0032]FIGS. 7A-7B is a schematic representation of solder pastedistributions on a printed circuit board;

[0033]FIGS. 8A-8H is a schematic of various kernel configuration optionsfor paste texture spacing versus magnification;

[0034]FIGS. 9A-9D is a representation of experimental results from asystem that utilizes an embodiment of the invention;

[0035]FIGS. 10A-10C is a comparison of raw images from a system thatutilizes an embodiment of the invention without saturation;

[0036]FIGS. 11A-11C is a comparison of raw images from a system thatutilizes an embodiment of the invention with saturation;

[0037]FIG. 12 is a histogram of experimental results from a system thatutilizes an embodiment of the invention;

[0038]FIG. 13 is a flowchart of a prior art process for inspectingsolder paste deposited on a substrate;

[0039]FIG. 14 is a greyscale image of paste acquired in the acquisitionstep of FIG. 13;

[0040]FIG. 15 is a weighted paste only image of the grayscale image ofFIG. 14 as converted to a paste only image during the paste-only imagestep of FIG. 13;

[0041]FIG. 16 is an RGB image of UV enhanced fluorescent paste acquiredduring the acquisition step of FIG. 13;

[0042]FIG. 17 is a binary paste only image of the RGB image of FIG. 16,as converted to a paste only image during the paste-only image step ofFIG. 13;

[0043]FIG. 18 is a flowchart of a print defect detection sequence, inaccordance with one embodiment of the invention;

[0044]FIGS. 19A-19C are details of a run-time image with illustrativefeatures indicated, in accordance with an embodiment of the invention;

[0045]FIGS. 20A-20C are details of a paste-only image of the respectiveimages in FIGS. 19A-19C;

[0046]FIG. 21 is a flow chart of a process for bridge feature analysis,in accordance with an embodiment of the invention;

[0047]FIG. 22 is a general block diagram illustrating the inputs andoutputs of a system implemented in accordance with an embodiment of theinvention;

[0048]FIGS. 23A-23C are first illustrative run-time, paste-only, andprojected paste only images of solder paste in a gap, processed inaccordance with an embodiment of the invention;

[0049]FIGS. 24A-24D are second illustrative run-time, paste-only, regionof interest, and projected paste only images of solder paste in a gap,processed in accordance with an embodiment of the invention;

[0050]FIGS. 25A-25C are third illustrative run-time, paste-only, andprojected paste only images of solder paste in a gap, processed inaccordance with an embodiment of the invention;

[0051]FIG. 26 is an illustration showing the effect of variations in padsize on gap size, in accordance with an embodiment of the invention;

[0052]FIG. 27 is an illustration showing the effect of variations in padposition on gap size, in accordance with an embodiment of the invention;

[0053]FIG. 28 is a first representative illustration showing types ofbridges/bridge-like features that may be detectable using one embodimentof the invention;

[0054]FIG. 29 is a second representative illustration showing types ofbridges/bridge-like features that may be detectable using one embodimentof the invention;

[0055]FIG. 30 is a third representative illustration showing types ofbridges/bridge-like features that may be detectable using one embodimentof the invention; and

[0056]FIG. 31 is a representative illustration of various types ofscreen printing/solder paste printing defects that may be detectable inaccordance with at least some embodiments of the invention.

[0057] The drawings are not necessarily to scale, emphasis insteadgenerally being placed upon illustrating the principles of theinvention.

DETAILED DESCRIPTION

[0058] One embodiment of the present invention generally relates to astencil printer utilizing a method for conducting solder paste texturerecognition. This technique is used to acquire paste-only images ofprinted substrates, such as stencils and circuit boards, for use inanalyzing and thereafter preventing defects. For example, print defectsoften occur in the process of printing solder paste on a circuit boardusing a stencil printer. FIG. 1A shows a front view of a stencil printer100 in accordance with one embodiment of the present invention. Thestencil printer 100 includes a frame 12 that supports components of thestencil printer including a controller 108, a stencil 16, and adispensing head 118 having a dispensing slot 118 a from which solderpaste may be dispensed.

[0059] The dispensing head 118 is coupled to a first plate 18 using twothumbscrews 22. The first plate 18 is coupled to a second plate 20 whichis coupled to the frame 12 of the stencil printer 10. The first plate 18is coupled to the second plate 20 in such a manner that the first platecan be moved with respect to the second plate along a z-axis, the z-axisbeing defined by the coordinate axis system 23 shown in FIG. 1A. Thefirst plate is moved by motors under the control of the controller 108.

[0060] The second plate 20 is movably coupled to the frame 12 such thatthe second plate 20 can move with respect to the frame 12 along anx-axis, the x-axis also being defined by the coordinate axis system 23.As described below, the movements of the first and second plates allowthe dispensing head 118 to be placed over the stencil 16 and movedacross the stencil to allow printing of solder paste onto a circuitboard.

[0061] Stencil printer 100 also includes a conveyor system having rails24 for transporting a circuit board 102 to a printing position in thestencil printer. The stencil printer has a number of pins 28, positionedbeneath the circuit board when the circuit board is in the dispensingposition. The pins are used to raise the circuit board 102 off of therails 24 to place the circuit board in contact with, or in closeproximity to, the stencil 16 when printing is to occur.

[0062] The dispensing head 118 is configured to receive two standardSEMCO three ounce or six ounce solder paste cartridges 104 that providesolder paste to the dispensing head 118 during a printing operation.Each of the solder paste cartridges 104 is coupled to one end of apneumatic air hose 30. As readily understood by those skilled in theart, the dispensing head could be adapted to receive other standard, ornon-standard, cartridges. The other end of each of the pneumatic airhoses is attached to a compressor that under the control of thecontroller 108 provides pressurized air to the cartridges to forcesolder paste to flow from the cartridges into the dispense head 118 andonto the screen 16. Mechanical devices, such as a piston, may be used inaddition to, or in place of, air pressure to force the solder paste fromthe SEMCO cartridges into the dispensing head.

[0063] In one embodiment of the present invention, the controller 108 isimplemented using a personal computer using the Microsoft DOS orWindows® NT operating system with application specific software tocontrol the operation of the stencil printer as described herein.

[0064] The stencil printer 100 operates as follows. A circuit board 102is loaded into the stencil printer using the conveyor rails 24. Amachine vision process for automatically aligning the printed circuitboard 102 to stencil 16 is implemented. The printed circuit board 102and stencil 16 are brought into contact, or nearly so, prior toapplication of the solder paste. The dispensing head 118 is then loweredin the z-direction until it is in contact with the stencil 16.Pressurized air is provided to the cartridges 104 while the dispensinghead is moved in the x direction across the stencil 16. The pressurizedair forces solder paste out the cartridges and creates pressure on thesolder paste in the dispensing head forcing solder paste from thedispensing slot 118 a of the dispensing head 118 through apertures inthe stencil 16 and onto the circuit board 102. Once the dispensing head118 has fully traversed the stencil 16, the circuit board 102 is loweredback onto the conveyor rails 24 and transported from the printer so thata second circuit board may be loaded into the printer. To print on thesecond circuit board 102, the dispensing head 118 is moved across thestencil in the direction opposite to that used for the first circuitboard. Alternatively, a squeegee arm could swing in to contain thesolder paste in the dispenser, and the dispenser can then be lifted inthe z-direction and moved back to its original position to prepare toprint on the second circuit board using a similar direction stroke.

[0065] As described further in U.S. Pat. No. 6,324,973 entitled “Methodand Apparatus for Dispensing Material in a Printer” filed on Jan. 21,1999, assigned to Speedline Technologies, Inc., the assignee of thepresent invention and incorporated herein by reference, the dispensinghead 118 is lowered into a printing position so that it is in contactwith the stencil. The stencil printer 100 operates by forcing solderpaste from the dispensing head 118 onto the stencil using air pressureapplied to each of the SEMCO cartridges as the dispensing head movesacross the stencil. In the printing position, two blades (not shown)come into contact with the top surface of the stencil. For eachdirection that the dispensing head moves across the stencil, one of theblades will be a trailing blade and will scrape any excess solder pasteoff the stencil.

[0066] At the conclusion of printing, when it is desired to lift thedispensing head 118 off of the stencil, the controller 108 turns off thepressurized air source, prior to lifting the dispensing head 118. Thiscauses the solder paste to remain in a chamber (not shown) when thedispensing head 118 is lifted and effectively reduces the amount ofsolder paste that is left on the stencil when printing is complete.

[0067] After the solder paste has been deposited onto the printedcircuit board, a machine vision process for automatically inspecting theprinted circuit board is implemented. In one embodiment of the presentinvention, the inspection process uses a texture recognition method todetermine whether solder paste has been properly deposited ontopredetermined contact regions located on the printed circuit board. Thesolder paste texture recognition system used in embodiments of thepresent invention will now be described.

[0068] Referring to FIG. 1B, a functional block diagram 101 of thescreen printer 100 is shown. In FIG. 1B, the screen printer 100 is showninspecting a substrate 102 having a substance 102 a deposited thereon.In one embodiment, the substrate 102 includes a printed circuit board,stencil, wafer, or any flat surface, and the substance 102 a includessolder paste.

[0069]FIG. 2A and FIG. 2B, show a top plan view of a printed circuitboard 220 which may be used in place of the substrate 102 in FIG. 1B.The printed circuit board 220 has a region of interest 222 and contactregions 224. It also has traces 226 and vias 228. FIG. 2A shows theprinted circuit board 220 without solder paste deposits on any of thecontact regions 224. FIG. 2B shows solder paste deposits 230 distributedon the predetermined contact regions 224 of the printed circuit board220. In the printed circuit board 220, the predetermined areas 224 aredistributed across a designated region of interest 222 of the printedcircuit board 220.

[0070]FIG. 2B shows a misalignment of the solder paste deposits 230 withcontact pads 224. Each of the solder paste deposits 230 is partiallytouching one of the contact regions. However, to insure good electricalcontact and prevent bridging between pad regions (i.e. short circuits),solder paste deposits 230 should be aligned to contact pad regions 224within specific tolerances. An embodiment of the invention describedherein discloses a method using texture recognition to detect misalignedsolder paste deposit on contact pads, and as a result, generallyimproves the manufacturing yield of printed circuit boards.

[0071] Referring to FIG. 2C, a top plan view of a stencil is shown. Thestencil 250 may also represent the substrate 102 which requiresinspection, as depicted in FIG. 1B. The stencil 250 includes apertures252 through which solder paste is deposited onto the printed circuitboard. Apertures 252 can be substantially small in size depending on thecircuit board requiring printing. Solder paste 258 deposited through theapertures often becomes lodged on the sides 254 or surrounding area 256of the apertures 252 during a single printing cycle or repetitiveprinting cycles. Thus, both the position of the stencil and the size ofthe apertures in the stencil may contribute to solder paste gettinglodged in the apertures. It may be necessary, therefore, to inspect thesolder paste deposits on both the stencil and on the printed circuitboard to reliably detect defects associated with the printing operation.

[0072] Again referring to FIG. 1B, in one embodiment of the presentinvention, a method for solder paste texture recognition includes a stepof using a camera 104 to capture an image of the substrate 102 having asubstance 102 a deposited thereon. In one embodiment, the camera 104 isa charge-coupled device that transmits a real-time analog signal 105 toa frame grabber 106. The real-time analog signal corresponds to an imageof the substrate 102 having the substance 102 a deposited thereon. Thecamera 104 may obtain an image of the substance 102 a using a rastertype scan, or an area scan of the substrate 102. In one embodiment, thecamera 104 is also able to image the bottom side of the substrate 102 orstencil 16 by using a combination of mirrors, beam splitters, or anothercamera.

[0073] The camera 104 transmits an analog signal 105 to a frame grabber106. The analog signal 105 contains information regarding the image ofthe substrate 102 and the substance 102 a deposited thereon. The framegrabber 106 digitizes the analog signal 105 and creates a digitizedimage 105 a which may be displayed on a monitor 107. The digitized image105 a is divided into a predetermined number of pixels, each having abrightness value from 0 to 255 gray levels (in an 8-bit range). In oneembodiment of the invention, the analog signal 105 represents areal-time image signal of the substrate 102 and substance 102 adeposited thereon. However, in an alternative embodiment, a stored imageis transmitted from a memory device coupled to a controller 108.Furthermore, depending upon the camera 104, and other devices used toacquire the image of the substrate 102 and the substance 102 a, thebrightness values used could range from 0 to 65,535 gray levels (in a16-bit range).

[0074] The frame grabber 106 is electrically connected to the processor116. The controller 108 includes a processor 116 and the frame grabber106. The processor 116 calculates statistical variations in texture inthe image 105 a of the substance 102 a. The texture variations in theimage 105 a of the substance 102 a are calculated independent ofrelative brightness of non-substance background features on thesubstrate 102, so that the processor 116 can determine the location ofthe substance 102 a on the substrate 102, and to compare the location ofthe substance 102 a with a desired location. In one embodiment of thepresent invention, if the comparison between the desired location andthe actual location of the substance 102 a reveals misalignmentexceeding a predefined threshold, the processor 116 responds withadaptive measures to reduce or eliminate the error, and may reject thesubstrate or trigger an alarm via the controller 108. The controller 108is electrically connected to the drive motors 120 of the stencil printer100 to facilitate alignment of the stencil and substrate as well asother motion related to the printing process.

[0075] The controller 108 is part of a control loop 114 that includesthe drive motors 120 of the stencil printer 100, the camera 104, theframe grabber 106, and the processor 116. The controller 108 sends asignal to adjust the alignment of a stencil printer frame 12, and thusthe mechanically coupled stencil 16, should the substance 102 a on thesubstrate 102 be misaligned.

[0076] The method of capturing an image is substantially the same forinspecting both the circuit board and the stencil. FIG. 3 shows aflowchart 300 of the method for inspecting solder paste deposits on asubstrate. Step 302 includes capturing an image 105 of a substancedeposited onto a substrate 102. In one embodiment, the substance 102 ais solder paste and the substrate 102 is a printed circuit board. Theimage 105 a of the substrate 102 with a substance 102 a depositedthereon may be captured in real-time or retrieved from a computermemory. Step 304 includes sending the image 105 a to a processor 116.The remaining steps in the inspection method are performed by theprocessor 116. Step 306 detects texture variations in the image 105 autilizing various texture sensitive operators described below. Thetexture variations are used to determine the location of the substance102 a on the substrate 102. In Step 308, the processor 116 is programmedto compare the texture variations at a particular location with texturefeatures at predetermined locations of the substrate. In Step 310, ifthe variations are within predetermined limits, the processor 116 mayrespond with dynamic adaptive measures (Step 314) to refine the mainprocess. If the variations lie outside predetermined limits, then Step314 triggers appropriate recovery measures through Step 312 to rejectthe substrate, terminate the process, or trigger an alarm via controller108. Related statistical process control (SPC) data are recorded in step316 along with other process data and is available for review andanalysis both locally and via network access.

[0077] For example, as mentioned, the substrate 102 can be a circuitboard on which texture recognition is performed. With detection of thesolder paste on a circuit board portion 260, a measurement of the bridgethat occurs in a gap between two pads is made. Referring to FIG. 2D, thesolder paste 262 is deposited on a pad 264, the gap between adjacentpads 264 being identified by reference number 266. The solder paste 262on both sides of a gap 268 is summed along a single axis to determinethe maximum span of each bridge. With continued reference to FIG. 2D,and referring to FIG. 2F, the texture based solder paste recognitionmethod is also used to detect paste on a stencil portion 270 so that acorrelation can be made between the first measurement of the span 268 ofthe bridges on the circuit board and a second measurement of the gap onthe stencil. Solder paste 262 is detected both in stencil apertures 272and in the space between two adjacent apertures, referred to herein asthe stencil gap 274. The maximum amount of solder paste 262 detected inthe stencil gap 274 is correlated to the maximum bridge span 268 on thecircuit board, allowing a prevention mechanism to be implemented basedon detection of solder paste on the stencil.

[0078] Referring to FIG. 2E, when the paste contamination on the stencilexceeds the maximum gap cover on the stencil, bridge-like featuresappear on the circuit board. This is represented by line 276 havingsharp peaks crossing the 80% limit in FIG. 2E. The maximum gap cover ofthe stencil is represented by line 277 in FIG. 2E. Based on thisoccurrence, a threshold level of contamination is set, such that whencontamination of the stencil reaches the threshold level, a wipe orother cleaning process of the stencil is triggered, preventing theformation of large bridges on the surface of the circuit board. As shownin FIG. 2G, bridges are avoided when the stencil is cleaned, resultingin no peaks of line 278 reaching at or near 80%. The maximum gap coverof the stencil is represented by line 279. Thus, texture based solderpaste recognition techniques are used to detect solder paste on thecircuit board 220 and on the stencil 250, and by detecting deposits ofsolder paste on the circuit board and the stencil, general improvementsare made to the manufacturing yield of printed circuit boards.

[0079] As mentioned above, detecting the variations of texture in theimage 105 a, and comparing the location and area of the substance 102 awith a predetermined location and area (where area is a length by widthmeasurement of the substance), utilizes a processor 116.

[0080] Processor Functions

[0081] The technique used by the processor 116 to recognize solder paste228 on a printed circuit board 224 and on a stencil 250 will now bedescribed. In one embodiment of the present invention, the processor 116performs four functions. The four functions are image enhancement,texture segmentation, image location analysis, and process control.

[0082] As previously stated, existing solder paste inspection systemsprimarily use basic single or dual thresholding methods that onlyutilize differences in pixel brightness of the original image toidentify solder paste. In embodiments of the invention, the processor116 also utilizes single and dual thresholding techniques but on animage that is pre-processed using various texture sensitive operatorssuch that single and dual thresholds may be used to separate specificregions based on relative texture, as in this case, to identify thelocation and area of solder paste deposits. The dual threshold techniqueis preferred since it provides a more accurate scalable transition atedge pixels or any region of uncertainty in the texture based image.

[0083] The texture sensitive operators utilized by the method of theinvention include a sharpening operator, a Laplacian operator, and asmoothing operator that includes a boosting mechanism. Each of theoperators will be described as part of the processor functions.

[0084] Texture is a variation of brightness. In particular, texturerefers to the local variation in brightness from one pixel to another.Thus, if brightness is interpreted as the elevation in an image, thenthe texture is a measure of surface roughness.

[0085] In one embodiment of the present invention, a range operator maybe used to detect texture in image 105 a. The range operator representsthe difference between maximum and minimum brightness values in aneighborhood. The range operator converts the original image 105 a toone in which brightness represents the texture. Specifically, theoriginal brightness features disappear and different structural regionsare distinguished by the range brightness. The range operator may alsobe used to define edge boundaries of an image.

[0086] Another texture operator is represented by the variance inneighborhood regions. In one embodiment of the invention, the processoris programmed to calculate the variance. The variance is essentially thesum of squares of the difference between the brightness of a centralpixel and its neighbors. If the sum of squares is first normalized bydividing by the number of pixels in the neighborhood, then this resultrepresents the root mean square (RMS) difference of values andcorresponds to the surface roughness. These texture sensitive operatorsand methods may be implemented using rudimentary tools provided bysoftware suppliers to effectuate machine vision processes. Theseprocesses are generally discussed by John C. Russ in “The ImageProcessing Handbook, Second Edition”, and in the “Handbook of ComputerVision Algorithms in Image Algebra”, by Gerhard X. Ritter and Joseph N.Wilson which are incorporated herein by reference.

[0087] In one embodiment of the invention, the processor 116 isprogrammed to perform separate functions using the aforementionedtexture sensitive operators. The operations performed by the processor116 are logically represented in a functional block diagram shown inFIG. 4A, wherein the separate operations are shown connected by aninformation bus 214 which facilitates sharing data between thefunctional blocks. The filtering section 202 of the processor 116performs a texture segmentation process. The acquisition section 206 ofthe processor 116 calculates the gain and offset required to provide aspecific contrast and brightness to enhance a run-time image 105 a. Theanalysis section 210 of the processor 116 performs location and contouranalysis of the solder paste region 102 a on the substrate 102 andcompares both to predetermined parameters. The process control section212 of the processor 116 is used to minimize any aliasing in an image ofthe solder paste region 102 a. The following is a discussion of theperformance of each of the various functions of the processor 116.

[0088] The Filtering Section 202

[0089] In one embodiment of the invention, the filtering section 202 ofthe processor 116 performs image filtering utilizing a Laplacian filter202B shown in FIG. 4B. The Laplacian filter 202B includes Laplacianoperators. The Laplacian operator is essentially an approximation to thelinear second derivative of brightness. The operator highlights thepoints, lines and edges of an image and suppresses uniform and smoothlyvarying regions of the image. In one embodiment, the Laplacian operatoris represented by the 3 by 3 matrix shown in FIG. 5A. The 3 by 3 matrix,referred to as a kernel, has a central pixel having a value equal tonegative four which means that the brightness value of the central pixelin the image 105 a is multiplied by negative four. In the Laplaciankernel, the values of the four neighbors touching the sides, above andbelow the central pixel is equal to one. Accordingly, the brightnesslevels of the four nearest neighbors to the central pixel in the image105 a are multiplied by one. Typically, the four neighbors are locatedusing the directions north, east, south and west relative to the centralpixel. However, other orientations are possible (as shown in FIGS.8A-8H).

[0090] The specified pixels of the kernel are multiplied by thecorresponding kernel coefficient and then added together. Note that, inthis embodiment, the total sum of the Laplacian kernel coefficientsequals zero. Consequently in a region of the image 105 a that is uniformin brightness, or has a uniform gradient of brightness, the result ofapplying this kernel reduces the gray level to zero. However, when adiscontinuity is present, e.g., a point, line or edge, the result of theLaplacian kernel may be non-zero depending upon where the central pointlies on the discontinuity.

[0091] Because the image 105 a can be divided into millions of pixels,and a method of the invention compares each pixel with its neighbors,processor speed may be effected. However, in an embodiment of theinvention, an option is provided to increase the speed of operation ofthe inspection system by reducing the time to capture and process animage. Specifically, a fill-factor option may be selected to produceonly a partially processed image of the substrate 102. The fill-factoris a multiplier that may be used with a subsequent blob-type operator toarrive at a calculated equivalent area of the image of the substrate102.

[0092] The image filtering method performed by the filtering section 202further includes a sharpening step. The sharpening step is implementedby a sharpening filter 202A shown in FIG. 4B. The sharpening filter 202Aimproves the image 105 a by locally increasing the contrast at areas ofdiscontinuity. The sharpening filter can be described as a specific typeof Laplacian filter. As mentioned, the Laplacian operator is anapproximation to the linear second derivative of the brightness (B) indirections x and y, and is represented by the equation:

{overscore (V)} ² B≡∂ ² B/∂x ² +∂ ² B/∂y ².  (1.0)

[0093] The above equation (1.0) is invariant to rotation, and henceinsensitive to the direction in which the discontinuity runs. The effectof the Laplacian operator is to highlight the points, lines and edges inan image 105 a and to suppress uniform and smoothly varying regions. Byitself, this Laplacian image is not very easy to interpret. However, bycombining the Laplacian enhancements with the original image 105 a, theoverall gray scale variation is restored. This technique also sharpensthe image by increasing the contrast at the discontinuities.

[0094] The sharpening kernel of the sharpening filter 202A used in oneembodiment of the invention to locally increase the contrast is shown inFIG. 5B. Note that the central weight of the sharpening kernel has avalue of five. In another embodiment of the invention, the centralweight is negative five, and the north, east, south and west neighborsare multiplied by one.

[0095] The sharpening kernel, also referred to as a sharpening operator,improves the contrast produced at the edges of the image 105 a.Justification for the procedure can be found in two differentexplanations. First, the blur in an image can be modeled as a diffusionprocess which obeys the partial differential equation:

∂ƒ/∂t=κ{overscore (V)} ²ƒ,  (1.2)

[0096] where the blur function is ƒ(x,y,t), t is time and κ is aconstant. If equation (1.2) is approximated using a Taylor seriesexpansion around time τ, then one can express the brightness of theunblurred image as

B(x,y)=ƒ(x,y,t)−τ∂ƒ/∂t+0.5τ²∂² ƒ/∂t ²− . . . .  (1.4)

[0097] If the higher order terms are ignored, then equation (1.4)becomes

B=ƒ−κ{overscore (V)} ²ƒ.  (1.6)

[0098] Accordingly, the brightness of the unblurred image B can berestored by subtracting the Laplacian (times a constant) from theblurred image ƒ.

[0099] A second justification for the procedure can be found usingFourier analysis to describe the operation of the Laplacian operator asa high pass filter comprising high and low frequency components of theimage brightness. In this approach, a smoothing kernel is described as alow pass filter. This low pass filter removes the high frequencyvariability associated with noise which can cause the nearby pixels tovary in brightness. Conversely, a high pass filter allows these highfrequencies to remain (pass through the filter) while removing the lowfrequencies corresponding to the gradual overall variation inbrightness.

[0100] Accordingly, the image filtering method performed by thefiltering section 202 of the processor 116 includes a smoothing step.The smoothing step is implemented using a smoothing filter 202C shown inFIG. 4B. The smoothing filter 202C is used to reduce the signal to noiseratio associated with the image 105 a. Essentially, the smoothing stepperforms spatial averaging. The spatial averaging adds together thepixel brightness values in each small region of the image 105 a, anddivides by the number of pixels in the neighborhood, and uses theresulting value to construct a new image.

[0101] In one embodiment of the invention, the smoothing operatorutilized is shown in FIG. 5C. In this embodiment, the value of thecentral and neighboring pixels in the smoothing kernel are all equal toone. Smoothing is used here to average similarly textured regions to beseparated via subsequent thresholding operations.

[0102] Smoothing operations tend to reduce the maximum values andincrease minimum values in the image. Depending on the ratio of brightpixels versus dark pixels, the resulting image may brighten or darken assmoothing is applied. Performing an unlimited number of smoothingoperations would ultimately result in an image with only one gray level.In this embodiment dark pixels (indicating low frequencies) are moreprevalent, so instead of dividing by nine, the number of pixels used,the sum is divided by eight to effectively boost the smoothed image by afactor of 1.125 after each application or pass such that contrast andbrightness is improved for subsequent thresholding operations. This alsoimproves processing speed by allowing a relatively faster shift-by-3(binary) operation rather than a numerically equivalent but slowerdivision by eight. In this embodiment, the best results are typicallyobserved after six smoothing applications, or passes, as describedabove.

[0103] In another embodiment of the invention, one may reduce the signalto noise ratio by performing a kernel operation. The kernel operation isspatial averaging that is performed by replacing each of the pixels withthe average of itself and its neighbors. In one embodiment of theinvention, a computer program performs the kernel operation andcalculates the above described image morphologies using sharpeningoperators, Laplacian operators, and smoothing operators.

[0104] The Acquisition Section 206

[0105] In one embodiment of the invention, the processor 116 includes anacquisition section 206 that provides automatic gain and offsets (AGO)used to view or capture the image 105 a. In general, any means to adjustor otherwise enhance brightness, contrast or overall quality of thereal-time image 105 or stored image 105 a, or portions of the image 105a may be applied. Such enhancements may include, but are not limited to,lighting configurations, utilizing optical filters, spatial filters,polarizers, or any method that includes a combination thereof. Theenhancements may further include software manipulation of the pixels inthe image 105 a to provide optical corrections to aberrations,vignetting and lighting.

[0106]FIG. 6 shows a flowchart 500 that describes the acquisitionsection 206 of the processor 116 in one embodiment of the invention. Thesteps described by the flowchart 500 may be implemented by software inthe processor 116, hardware components, or a combination of hardware andsoftware. Referring to FIG. 6, system parameters may be set manually orautomatically in step 502, where the system default parameters mayinclude the type of camera 104 being used, and the input voltages tovarious tail locations. Tail locations refer to the left (darkest) andright (brightest) ends, or tails, of a brightness histogram of the image105 a.

[0107] Step 504 captures the initial image 105, and a sampling windowfor analyzing the image is defined in Step 506. The sampling window maybe manually or automatically defined and is the source of image data forthe calculations performed in steps 508 and 514. Step 508 calculates thegain and offset required to move the left and right tails of the image105 a to predetermined locations. Step 510 performs a second acquisitionbased on information calculated in step 508 to adjust and enhance thehistogram distribution of image data for subsequent operations. In oneembodiment of the invention, Step 510 also performs a linear expansionand shift to further improve the image brightness and contrast of image105 a.

[0108] In one embodiment of the invention, experimental results indicatethat initial limitations may be set as shown in Tables 1 and 2 belowwhen using an 8-bit video unit a video frame grabber equipped with atypical programmable Analog to Digital Converter (ADC): TABLE 1 InitialADC command values for the Automatic Gain and Offset function. ParameterOffset Gain Initial Command Values 16 127 (for 7.5 IRE = 0) (for 100 IRE= 255)

[0109] Table 1 shows the initial 8-bit ADC command values that typicallyallow the full range of standard video input levels, when digitized, tofully span the 8-bit ADC output range without clipping. Note that for agray scale range from 0 (or 7.5 IRE) to 255 (or 100 IRE) where 100 IREequals 0.714 volts, the initial command values for the offset and gainis 16 and 127 respectively.

[0110] Table 2 below shows the maximum and minimum range of commandvalues used to control an input section of the ADC hardware. Also shownare adjustment limitations based on the typical signal-to-noiseperformance of the incoming video signal and the expected signal range.TABLE 2 ADC command value range and limits for the Automatic Gain andOffset function. Parameter Minimum Maximum Command Value Range  0 255Gain Adjustment Limits 40 255 (maximum gain) (minimum gain) OffsetAdjustment Limits  0 150 (brightest offset) (darkest offset)

[0111] Table 3 below shows typical target tail locations used by theAutomatic Gain and Offset (AGO) function to determine ADC gain andoffset command values that, when applied in subsequent acquisitions,tend to limit the tails of similar regions or features of interest tothe target values. TABLE 3 Initial Target Parameters for the AutomaticGain and Offset function. Parameter Left Tail Right Tail Target TailLocations 63 191 for Paste Sample (darkest paste feature) (brightestpaste feature) Window Target Tail Locations 15 240 for Full Field ofView (darkest feature) (brightest feature)

[0112] In general, the target values are selected that optimize regionsor features of interest for a specific image processing task. In Step508, tail locations 63 and 191 shown in Table 3 are used by the AGOfunction to enhance solder paste regions without regard to the validityof other non-paste image data. Alternatively, the tail locations 15 and240 shown in Table 3 may be used to provide a full field of valid imagedata and to allow tails of subsequent acquisitions to drift slightlywithout loss due to clipping at each end of the 8-bit gray scale.

[0113] In one embodiment of the invention, Step 508 includes clip rangedetection, warning, and corrective methods for RS170/NTSC signalvoltages that exceed approximately 120±3 IRE, or 0.835 to 0.878 volts.Processor 116 automatically adjusts acquisition parameters such thatsignal voltages remain within normal operating range.

[0114] Typical RS170/NTSC cameras have output signal clip levels set to120±3 IRE, or approximately 0.835 to 0.878 volts, where 100 IRE equals0.714 volts. If the voltages are over the clip range, a warning messageis sent indicating that saturation has either occurred or is likely. Ifthe voltages are below the clip range, then the method proceeds to Step510. Step 510 administers the newly calculated parameters to acquire anenhanced image 105 a for further processing. Step 512 recalls the samplewindow coordinates defined in Step 506 and applies them to the new imagecaptured in Step 510. Step 514 performs a statistics-based AGO functionon the new sample window to determine optimal run-time acquisition andprocessing parameters. This method of the invention insures that similarstatistical characteristics are produced in paste regions of images thatare acquired at run-time.

[0115] In Step 516, the method of the invention determines whether thepreliminary run-time acquisition parameters are within predeterminedhardware and software limits. Also determined in Step 516 is whetherprocessing parameters, including kernel geometry and the effectivesampling rate, are optimized to provide the maximum level ofperformance. If not, then the appropriate system parameters are adjustedin Step 518, and new parameters are inserted at Step 510. Steps 510through 516 are then repeated. Once the run-time parameters aredetermined they are saved in memory at Step 520 and the method of theinvention terminates.

[0116] A histogram that shows the effects of the AGO in section 206 ofthe processor 116 is shown in FIGS. 7A-7B. Referring to FIG. 7A, ahistogram of the original image of a printed circuit board 220 havingsolder paste 102 deposited thereon is shown. The x-axis of the histogramrepresents the gray levels from 0 to 255, and the y-axis represents thenumber of image pixels at each gray level. FIG. 7B shows a histogram ofthe same image with paste contrast enhanced. FIG. 7B also shows aconsiderable number of non-paste pixels clipped at 255. In oneembodiment of the invention, the left tail of the original image equalsfifteen, and the right tail equals 240 on a gray scale level thatextends from 0 to 255 (implying an 8-bit gray scale). In anotherembodiment of the invention, Step 502 allows the processor 116 toautomatically calculate and set initial acquisition parameters, oralternatively allows an operator to set the parameters. In anotherembodiment of the invention, the step of setting the AGO (step 502)allows an operator to manually set the acquisition parameters, or allowsthe processor 116 to automatically calculate and set the parameters.

[0117] As mentioned, Step 510 acquires a new image 105 a to enhance theregion of interest, in this case solder paste, based on parameterscalculated in Step 508. In one embodiment of the invention and referringto FIG. 7B, the gray levels for the left tail and right tail of theenhanced image 105 a occur at 15 and 255. In one embodiment of theinvention and referring to FIG. 7B, the gray levels for the left tailand right tail of the adjusted image occur at 15 and 255 as a secondpass is performed on the image 105 a in step 510 to enhance the regionof interest, in this case solder paste, based on parameters calculatedin step 508. The calculation performed by the acquisition section 206 ofthe processor 116 produces a linear expansion and shift of the solderpaste region such that the solder paste region of interest occursbetween tails 63 and 191. FIG. 7B also shows an increased number ofpixels at gray level 255 due to clipping of values that would otherwiseexceed 255 when the parameters calculated in step 508 are applied.

[0118] Comparing FIG. 7A and FIG. 7B, a reduction in height of they-axis in areas designated as paste reflects the redistribution of anequal number of paste pixels over more gray levels.

[0119] Analysis Section 210

[0120] The locator analysis section 210 of the processor 116 is used todetermine the location of solder paste relative to the predeterminedcontact regions 224. Coordinates of each area may be determined usingcentroids, blob techniques, correlation, and a variety of other searchtools. The process of utilizing blob techniques and centroids is wellknown and discussed by John C. Russ in “The Image Processing Handbook,Second Edition”; pages 416-431, 487-545, and in the “Handbook ofComputer Vision Algorithms in Image Algebra”, by Gerhard X. Ritter andJoseph N. Wilson; pages 161-172 which are incorporated herein byreference.

[0121] The results of the location analysis are used to detect thepresence, absence, and alignment of the paste, and thus alignment of thestencil 16 with the desired contact regions 224. Results also providethe basis for other adaptive and corrective process control measures. Inone embodiment of the invention, information provided by the locatorsection 210 is used to modify operational parameters of the dispenserhead 118.

[0122] Anti-Aliasing of the Solder Paste Image (Process Control Section212)

[0123] The process control section 212 of the processor 116 is used tominimize any aliasing in an image of the solder paste region 102 a. Inobtaining a digitized image 105 a of the solder paste region 102 adeposited on a substrate 102, several conditions unique to solder pastetexture recognition are considered. Specifically, in one embodiment ofthe invention, the grain size of the paste and its effect on the qualityof the image 105 a at various magnifications. Ordinarily, as long as thesampling rate is above the Nyquist frequency aliasing may be averted.However, when imaging solder paste regions, aliasing can also occurwithout the proper relationships between grain size, focal length,magnification, and the CCD pixel spacing. In one embodiment, the texturerecognition method of the invention considers four types of solder pasteshown in Table 2 4 below. TABLE 4 The types of solder paste used and thevarious grain sizes. Solder Paste Nominal Grain Diameter Type 3 35.0 μm1.3780 mils Type 4 29.0 μm 1.1417 mils Type 5 20.0 μm 0.7874 mils Type 610.0 μm 0.3937 mils

[0124] In general, different types of solder paste often vary in grainsize. Table 2 4 lists the nominal grain sizes associated with thevarious types of solder paste. In one embodiment of the invention, thevariation in grain size results in a minimum magnification with whichthe solder paste deposit 102 a may be viewed sampled effectively by aCCD camera 104.

[0125] If a set of system magnifications (measured in microns or milsper pixel) is selected so that each of the solder paste types shown inTable 4 is sampled at the Nyquist limit, then a table of compatiblemagnifications can be created as shown below in Table 5. TABLE 5Compatible system magnifications for various types of solder paste whereX indicates compatible magnification and the system magnification isshown in microns (μm) and mils per pixel (mpp). 5.0 μm 10.0 μm 14.5 μm17.5 μm 0.1969 mpp 0.3937 mpp 0.5709 mpp 0.6890 mpp Type 3 X X X X Type4 X X X — Type 5 X X — — Type 6 X — — —

[0126] In theory, the Nyquist limit is the highest frequency, or in thiscase the smallest grain size, that may be accurately sampled at a givensystem magnification. The Nyquist limit may be defined as half of thesampling rate.

[0127] As discussed, the method of solder paste texture recognitionrelies on the unique neighborhood features and statistics of solderpaste that which are pronounced when the image is in sharp focus. In oneembodiment of the invention, optical and imaging hardware is utilized toaccurately sample the paste texture. In that embodiment, the samplingfrequency of the paste particles is below the Nyquist limit of thesystem to avoid aliasing. Alternatively, magnification is generallylimited so that the unique frequency characteristic of the solder pasteis not lost, and where limited aliasing is acceptable, since theresultant characteristics of the image data, specifically in pasteregions, may still be used to detect evidence of the paste.

[0128] In one embodiment of the invention, the performance of theprocessor 116 is optimized within an appropriate range of magnificationby applying a frequency dependent kernel size and shape. Neighborhoodpixels that lie an appropriate distance from the primary pixel (usuallythe central pixel) can manually, or automatically be selected based uponspatial frequency of the paste particles. By adjusting the geometry ofthe processing kernels in this manner, the effective sampling rate canbe adjusted to accommodate various paste types. In one embodiment of theinvention, the sensor sampling frequency is proportional to thereciprocal pixel center to center spacing measured in cycles permillimeter, and the highest frequency that may be accurately sampled isone-half the sensor sampling frequency. The magnification may also bedescribed as a function of the pixel distribution patterns used tocapture or process the image of the solder paste regions.

[0129]FIGS. 8A-8H show various pixel distribution patterns used torecognize the solder paste deposits over a region. The pixeldistribution patterns represent sample kernel configurations for pastetexture spacing configurations. The pixel distribution pattern used formagnification depends upon the grain size of the solder paste. In FIGS.8A-8B and 8E-8F, the pixel distribution pattern shows the central pixelsand neighboring pixels touching. In FIGS. 8C-8D and 8G-8H, the centralpixels and neighboring pixels are shown separated by various distances.The distances are represented by diameters (measured in microns andmils) of a circle centered on the central pixel. The radius correspondsto the effective pixel spacing, or the sampling rate. Therefore, thediameter represents the Nyquist limit, or the minimum theoretical pastegrain size that can be sampled effectively using the indicated kernelgeometry. The distances are represented by the diameters (measured inmils) of a circular region of interest. In one embodiment of theinvention shown in FIGS. 8A-8D, each pixel represents 0.6621 mils, andthe circled regions of interest vary in diameter from 1.3242 mils to3.7454 mils. In FIGS. 8E-8H, each pixel represents 0.4797 mils, and thecircled regions of interest vary in diameter from 0.9594 mils to 2.7136mils.

[0130] Kernel configurations are not limited to those shown in FIGS.8A-8H and, in general, no connectivity between the pixels is required.

[0131] Experimental Results of Texture Recognition

[0132] As discussed above, one embodiment of the invention uses acombination of statistical and morphological operations on a digitizedimage to separate areas of solder paste texture areas from otherfeature-rich non-paste areas on a printed circuit board, stencil, wafer,or any substrate. FIGS. 9A-9D show the results of a system that utilizesan embodiment of the invention.

[0133] Shown in FIG. 9A is raw image data, with no saturation, of aprinted circuit board 802 having solder paste areas 804 and non-pastefeatures distributed thereon. The raw image shows a well-defined edge806 that outlines a circuit trace 808 leading to a contact region 810,and a well-defined separation line 812 that begins the contact region.

[0134] In FIG. 9B, the results of a processed image using the method ofthe invention is shown. The processed image reveals a solder bridge 814not seen in FIG. 9A. Note that the non-paste features including edge806, trace 808, contact region 810, and separation line 812 shown inFIG. 9A are shown as white areas in the region of interest 816, whilethe solder paste regions 818 are shown as black. Since in the outputimage the presence of solder paste is represented by a black region, anyregion that is not totally black or white indicates a scalabletransitional region at paste edges or some other area of uncertainty atthat location. Accordingly, the gray scalable regions 820 improve theability to accurately report the location and area of small pastedeposits where edges constitute a large percent of the total area and,under certain conditions, is more tolerant of variations in imagequality, brightness, and contrast.

[0135] Shown in FIG. 9C is the raw image, with saturation, of the sameprinted circuit board 802 having solder paste areas 804 and non-pastefeatures distributed thereon. The raw image shows the same well definededge 806 that outlines a circuit trace 808 leading to a contact region810. However, the well-defined separation line 812 shown in FIG. 9A, andthe gray level representation of trace 808 and the contact pads 810, areindistinguishable in FIG. 9C. FIG. 9C also shows a blemish 822 on theprinted circuit board not observed in any of the previous images.

[0136]FIG. 9D is the raw image, with saturation, processed utilizing themethod of the invention. The processed image shown in FIG. 9D reveals asolder bridge 814. The non paste features 816 are shown in FIG. 9D aswhite, paste edges 820 and areas of uncertainty in gray, and the solderpaste regions 818 are shown as black and represent areas in which 100percent solder paste is detected. Note that non-solder paste regions,including the blemish 822 shown in FIG. 9C, on the substrate are ignoredwhen the method of the invention is applied. The gray levels arescalable areas that represent regions that lie between the non-essentialfeatures on a printed circuit board and the solder paste deposits. Thegray scale information allows proportional accounting of edge pixels andany areas of uncertainty. Accordingly, the scalable gray areas conveymore information to an observer regarding the quality of the solderpaste contact region than a binary image that is either black or white.

[0137]FIGS. 10A-10C and FIGS. 11A-11C provide a comparison of imagesfrom a system that utilizes an embodiment of the invention. FIG. 11Ashows the same raw image of FIG. 10A except with saturation. The rawimages are processed utilizing the method of the invention. Theprocessed images may be made binary, i.e., black or white, byapplication of a single thresholding technique, or the processed imagesmay have a scalable gray range by application of a dual thresholdingtechnique. As previously described, dual thresholds make it possible toappropriately account for transitional regions at paste edges and otherareas of uncertainty. Accordingly, the method of the invention improvesthe ability of quality control software programs to accurately reportthe area of small paste deposits where edges constitute a large percentof the total area, and the method of the invention is more tolerant ofvariations in image quality, brightness, and contrast.

[0138]FIGS. 10A-10C show a series of ball grid array (BGA) images forcomparison between a raw image without saturation when single and dualthreshold processes are performed on the image. FIG. 10A shows anunprocessed raw BGA image 1002 without saturation, and an array ofpredetermined contact pads 1004. FIG. 10B shows the results of a singlethreshold process performed on the raw BGA image shown in FIG. 10A. FIG.10C shows the results of a dual threshold process utilizing scalablegray levels performed on the raw BGA image shown in FIG. 10A. Edges andregions of uncertainty are in shades of gray. One region of uncertaintyappears at 1006.

[0139]FIGS. 11A-11C show a series of BGA images for comparison with theraw BGA image 1002 with saturation when a single threshold process and adual threshold process are performed on the image. FIGS. 11A-11C alsoserves as a comparison of images from a ball grid array (BGA) from asystem that utilizes an embodiment of the invention with saturation.FIG. 11A shows an array of predetermined contact pads 1004, and anunprocessed raw BGA image 1002 with saturation. FIG. 1I B shows theresults of a single threshold process performed on the raw BGA image1002 of FIG. 11A. FIG. 11C shows the results of a dual threshold processutilizing scalable gray levels performed on the raw BGA image of FIG.11A. Edges and regions of uncertainty are in shades of gray. The sameregion of uncertainty 1006 appears in both FIG. 10C and FIG. 11C.

[0140] FIGS. 10B-C and FIGS. 11B-C show that the method of the inventionis tolerant of significant image brightness and contrast variations innon-paste features, including non-linear brightness changes, and dataloss due to saturation or drop-out of non-paste features.

[0141]FIG. 12 shows a histogram 1200 of the smoothed results of a systemthat utilizes an embodiment of the invention. The histogram is dividedinto three regions: a non-paste region 1202, a transition region 1204,and a solder paste region 1206. The histogram 1200 shows a distributionof pixel brightness which corresponds to the texture in the smoothedimage. In one embodiment, the smoothed image depicts paste as white andnon-paste as black. Accordingly, paste pixels 1206 favor the right endof the histogram and non-paste pixels 1202 favor the left end.Transitional pixels 1204 corresponding to an edge in the image is shownin the area between the paste and non-paste regions. In anotherembodiment of the invention, the smoothed image is inverted to depictpaste as black and non-paste as white.

[0142] Bridge Detection Methods

[0143]FIG. 13 is a flowchart of a prior art process for inspectingsolder paste deposited on a substrate. As an initial operation, theimage of a section of the board is acquired, such as by an area or linescan camera (step 1300). FIG. 14 is an illustrative example of an imageacquired in step 1300 of FIG. 13. FIG. 14 is a grayscale image of solderpaste. The image acquired in step 1300 is processed so that regions ofthe board that are covered with paste are more easily identified (step1310). For example, a paste detection (also referred to as pasterecognition) process is performed on the image to separate solder pastefrom non-paste features (e.g., the conductive pads, the substrate)creating a new “paste-only” image (steps 1310 and 1330). FIG. 15 is anillustrative example of a weighted paste-only image based on pastedetection applied to the image of FIG. 14. The resulting image is notnecessarily analyzed during paste detection at this stage to determinethe quantity, location, or significance of paste deposits. Instead, aseparate process (step 1340) may be used to analyze the paste-onlyimage.

[0144] Many different techniques can be used to separate the solderpaste from non-paste information. One known technique is thresholding,which can be used to divide an image into sections based on brightnessor some other parameter, such as visibility under a type of light. Asingle threshold (or brightness level) is chosen to create a binaryimage depicting paste and non-paste regions. Threshold techniquessegment an image into regions of interest and removes all other regionsthat are outside of the threshold and are thus deemed not essential. Forexample, a fluorescent dye can be added to solder paste so that only thepaste is visible under a particular type of light. FIG. 16 is a RedGreen Blue (RGB) image of UV entranced fluorescent paste, and FIG. 17 isa binary paste-only image from a “blue” light channel, using a “singlethreshold” method. Dual threshold methods work similarly but include ascalable transition region of brightness levels between thresholds tomore accurately account for edge pixels. The dual threshold method issometimes preferred over the single threshold, since small pastefeatures can contain a relatively significant amount of edge data.

[0145] Another known technique for paste detection is image subtraction.Subtraction methods create a “difference image” by subtracting one imagefrom another. Some subtraction-based paste detection methods comparedifferences between a reference image and a newly captured image todetect paste. In some instances, these images must be registeredprecisely to each other before subtraction to minimize error. Arelatively significant amount of computer storage, data retrieval, andmemory buffer capabilities may be needed to accommodate the manyreference images. Ideally a complete set of reference images need onlybe acquired once, but in doing so, performance can be adversely affectedby typical variations found between otherwise identical substrates. Toavoid such problems, new reference images can be acquired for eachsubstrate to be inspected, but this can slow the process considerablyand may be inappropriate for use in a high-speed production environment.Variations of the thresholding and/or image subtraction techniques mayinclude use of laser profiling to create a topographical image, andx-ray techniques. These and other methods are intended to betterseparate paste from non-paste regions for subsequent analyses.

[0146] One drawback that can occur with thresholding and imagesubtraction is that brightness levels of the solder paste and thebackground can often overlap. This overlapping can make it difficult, ifnot impossible, to effectively separate the solder paste images frombackground information. In addition, area and location of paste depositscannot be determined with certainty under such conditions thus limitingthe value of statistical process control (SPC) data and adaptive controlresponses.

[0147] One reason for identifying solder paste areas on a printedcircuit board is to detect solder defects, such as bridges. In solderpaste printing operations, the term “bridge” can describe a print defectwhere some amount of stray paste spans (or nearly spans) the gap betweenadjacent pads, or where some amount of stray paste spans a gap betweenpads beyond predefined limits. Bridges can be significant because, atcritical dimensions, a bridge of solder paste may fail to pull backduring subsequent reflow operations, causing a short or other relateddefect in the final assembly. Bridges are not the only type of printand/or paste defects. Other defects, such as excess paste, poor printdefinition, and poor alignment also can increase the probability thatsimilar defects, especially “shorts”, may appear at the location of theoriginal defect later in the assembly process.

[0148] One approach to increasing the yields associated with the solderpaste deposition process is to detect print defects immediately afterthe print operation and reject defective boards before the placement ofelectronic components. This enables surface mount technology (SMT)manufacturers to save time otherwise wasted in the assembly of defectiveboards and avoids costly rework. Whether or not a defect is reported atany specific site, SPC data can be collected and used to monitor andcorrect undesirable trends before they become critical to the process.

[0149] Assessment of bridges, bridge-like features, and other printdefects can be a subjective task with few hard rules or limits.Subjective descriptions of print defects such as “bridge,”“bridge-like,” “too much paste” may be viewed as subjective descriptionsof print defects. Without further technical assessment, it is difficultto use any or all of these subjective descriptions to predict whether adefect, such as a bridge-related defect, will appear later in a givenprocess, or to indicate the presence of a process trend where theprobability of such a defect is increased.

[0150] Some known techniques used to detected bridges, such as so-calledsimple “blob” and “bounding box” techniques, as well as bridge-detectiontechniques that rely solely on the area of the paste in a region ofinterest (e.g., a gap between pads), can be subject to binary “noise”and may provide little information about the geometry or actualsignificance of features within the “box” or region of interest.Further, paste-in-gap limits must often be set relatively high to avoidfalse detection. None of these methods can consistently and reliablydetect partial bridging or bridge-like tendencies for use in effectiveand preventative print process control.

[0151] As described, the solder paste texture recognition method can beused to detect particular defects that occur on a substrate, such asbridges. In solder past print operations, bridges or bridge-likefeatures can occur when a relatively well-defined deposit of paste spans(or nearly spans) the gap between pads, or when a deposit of paste goesbeyond predefined limits. As the span of a paste feature increasesacross the gap, so does the significance of the feature to the process.A so-called “classic” bridge would span the entire gap, but span alonedoes not guarantee that a related defect will occur later in theprocess. Something less than full span could be equally troublesome, orequally benign. Additional characteristics must be considered to gaugethe true significance of a defect to the process.

[0152] Although sections along a bridge may be narrow or “weak”, or itsbridge-like geometry poor, it has been found that the probability thatbridging will occur at some point during subsequent reflow operations isdependent on the amount, location, and geometry of paste involved. Asthe area covered by the paste feature increases, so does the probabilitythat the paste will cause a bridge-related defect when sufficient spanexists across the gap.

[0153] The thinnest point along the bridge feature, its so-called“weakest link,” may indicate an ability or tendency of the bridge tobreak and pull back during subsequent reflow operations. If a sectionalong the bridge is sufficiently narrow, the probability that the pastewill break and pull back from this point may be greater than theprobability of a deposit that remains relatively (or critically) wide atits narrowest point. As the width or “bulk” of the paste featureincreases so does the probability that the paste feature may cause abridge-related defect, provided a sufficient span exists across the gapand the total amount of paste forming the bridge is sufficient tomaintain it during subsequent reflow operations.

[0154] Another type of print defect is a so-called “general” printdefect. General print defects occur when the total quantity of paste,regardless of shape or location in the gap, is beyond predefined limits.When general print defects are detected, an actual paste bridge need notbe confirmed, and no further characterizations of the defect arerequired to make a decision that a substrate is defective. General printdefect conditions indicate generally poor print quality, poor alignment,bridging, or all of these, with an increased probability that abridge-related defect (e.g., a short circuit) may appear at the locationof the print defect later in the assembly process. For generalpaste-in-gap defects, a user-defined limit is applied to the total areaof paste found in the gap.

[0155] The precise inspection of bridges can be a critical tool not onlyfor the detection of many common SMT print defects, but also forcorrecting undesirable trends in the process. Since a relativelyinsignificant paste-in-gap area can provide significant bridge geometryacross the gap, and vice versa, both paste-in-gap and span measurementsare needed to reliably determine the true significance of bridge-likefeatures to a process.

[0156] One embodiment of the invention provides systems and methods forgap defect analysis that provides reliable paste-in-gap area measurementand detects significant geometry and span of bridge-like paste featuresas they relate to the surface mount technology (SMT) assembly process.In one embodiment, the total amount of paste in a gap and the effectivespan of bridge-like features across the gap are used together todetermine the probability that a specific paste feature will cause abridge-related defect.

[0157]FIG. 18 is a flowchart of a print defect detection sequence, inaccordance with one embodiment of the invention. The invention can usean image acquired in virtually any manner (step 1800), as long as theimage is (or can be) suitably segmented into a “paste-only” image (step1810). The image can be what is commonly referred to as a “digitized”image. The paste-only image, also referred to herein as a “processedimage”, can, for example, be a binary image or may have weighted graylevels to appropriately account for transitional regions at edges andother areas of uncertainty. Use of various image enhancement techniques,including so-called “leveling” or “field flattening” techniques, can beapplied to the acquired image during the first stages of processing toultimately improve the fidelity of the resulting paste-only image.

[0158] In at least one embodiment of the invention, the paste-only imageuses weighted pixels. Use of weighted pixel values improves the abilityof the bridge analysis of the invention to accurately report area andthus the significance of small paste deposits where edges constitute alarge percent of the total area and, under certain conditions, is moretolerant of minor variations in image quality, brightness, and contrast.In addition, use of weighted pixel values can achieve more accuratebridge detection results, particularly in small gap areas containingrelatively few pixels or sample points. In one embodiment of theinvention, a pre-determined look-up table, such as a 256 element lookuptable, can be used to effectively weigh pixels during creation of thepaste-only image 1810, at run-time, without requiring highly repetitive,redundant, run-time math operations.

[0159] “Paste-only” images can be created via the methods describedpreviously, including but not limited to direct application of single ordual thresholds to an acquired image, image subtraction techniques, andthe texture based segmentation technique described herein. Other usabletechniques for creating paste-only images, as described previously,include use of UV-dye enhanced paste, laser profiling, use ofinterferometry to create 2D representations of topographical data (i.e.,an image of “volume elements”, or “voxels”), and x-ray techniques. Thoseskilled in the art will appreciate that many methods now known and to bedeveloped in the future for producing segmented paste-only images areusable in at least some embodiments of the invention.

[0160] Referring again to FIG. 18, within the paste-only image (step1810), a region of interest is defined (step 1820). The region ofinterest, in one embodiment, is a region in which it is desired to knowthe amount and characteristics of a substance deposited therein. Forexample, on a PCB, wafer, stencil, or similar substrate this region ofinterest may be the gap between pads or apertures where the presence ofbridge or bridge-like features is undesirable. FIGS. 19A-19C and20A-20C, described below, illustrate run-time and paste-only imagesshowing a “region of interest”.

[0161]FIGS. 19A-19C are details of a run-time image with illustrativefeatures, including an example of a region of interest, in accordancewith an embodiment of the invention. FIGS. 19A-19C illustrate enlargedviews of a bridge-like feature 1900 in the solder paste 1903, andseveral typical non-paste (board) features. FIG. 19A is an enlarged viewof a first portion of the run time image shown in FIG. 19B, and FIG. 19Cis an enlarged view of a second portion of the run time image in FIG.19B, including the bridge-like feature 1900 and solder paste 1903. Thenon-paste features include, for example, a bare board 1906, a bare trace1910, the mask 1915 on the trace 1910, and the bare pad 1920. FIGS. 19Aand 19B also illustrate a gap 1920 between a first solder pad 1925 and asecond solder pad 1930. In this example, the solder paste 1903 isshifted to the right of the first solder pad 1925, into the gap 1920.

[0162]FIGS. 20A-20C are corresponding paste-only views of the imagesshown in FIGS. 19A-19C, respectively. FIGS. 20A-20C are illustrativeexamples of paste-only images created in accordance with the texturebased method described herein. As mentioned, texture-based images arebut one example of a plurality of suitable paste-only images. In FIG.20, the possible bridge-like feature 1900 is circled.

[0163] Referring again to FIG. 18, the paste only image of FIG. 20B canbe used for step 1810 and the gap region of interest 1920 shown in FIGS.19A and 20A can be used for step 1820, in at least one embodiment of theinvention. However, it is possible in at least one embodiment to reversesteps 1820 and 1810—that is, to define the region of interest in theacquired image, then create a paste-only image of the region of interestonly. Doing so may save processing time. In at least one embodiment ofthe invention, the paste-only conversion of step 1810 is performed overa region no bigger than that required to include all sub-regions asdefined in step 1820.

[0164] In step 1850, a projection and sliding average method (see FIG.21 and related discussion, below) is used on the suitably segmentedpaste-only image to ultimately detect and analyze significant bridge orbridge-like features within the specified region of interest. Inaddition, user defined inputs are set in step 1827, described in FIG. 22and related discussion. These user defined inputs help to measure thearea of the paste on pad (step 1830) and the paste in the gap (step1840), and to analyze the bridge feature (step 1850).

[0165] Referring briefly to FIG. 22, which is a general block diagramillustrating the inputs and outputs of a system 2200 implemented inaccordance with an embodiment of the invention, several user definedinputs 2210 are shown. These include the maximum amount of paste allowedin the gap 2215, the subjective “sensitivity” setting of the bridgedetection system 2220, and the maximum allowable span of a significantbridge feature across a gap 2225.

[0166] The maximum amount of paste allowed in the gap 2215 representswhat the user specifies as the maximum amount of paste that can be in agap before the quantity of paste is taken to indicate a significantprint defect. For example, this can be expressed as a percent of thenominal gap area, such as 55%, meaning that up to 55% of the nominal gaparea can be covered by paste before a paste-in-gap defect is said tooccur. These numbers are purely illustrative.

[0167] The “sensitivity” setting 2220 is used to calculate the size of asliding average window (a.k.a. the smoothing kernel) in step 2230, andultimately determines the degree of smoothing, or filtration, applied toprojected data as described later. This allows users to specify theminimum width, or “bulk”, of a bridge feature to be considered in spanmeasurements in relative terms, and is preferred. Alternatively, theuser could enter the “sensitivity” in more direct units, includingpixels, mils, and microns. In the embodiments of the invention describedherein, the width of the smoothing kernel 2230 and thus the minimumwidth of a feature considered to be a bridge feature is measured inpixels, such as 5 pixels wide, 10 pixels wide, etc. These numbers arepurely illustrative and will, of course, vary depending on the level ofbridge detection sensitivity desired.

[0168] The maximum allowable span of a significant bridge feature acrossa gap 2225 represents what a user specifies to be the maximum amountthat a feature, such as a bridge feature, can extend across a region ofinterest, such as a gap between pads. For example, this can be expressedas a percent of the gap, such as 70% of the width (or length) of a gap,in a direction parallel to the “bridging” axis. This number is purelyillustrative.

[0169] The size of a sliding average window 2230 is the size of theone-dimensional smoothing kernel, which is used in at least oneembodiment of the invention to smooth projected values of a gap. Thisprovides a localized average at each point along the projection whileremoving a corresponding level of fine detail not considered to besignificant to the process. This feature is described further herein. Asan example, the size of a sliding average window can be measured inpixels, e.g., 5 pixels. In at least one embodiment, the size of thesliding average window 2230 is based at least in part on the minimumwidth of a feature to be considered to be a significant bridge feature.The sensitivity settings of step 2220 are in relative terms (e.g., low,medium, high) that ultimately determine the width of the slidingaverage, in pixels, in step 2230.

[0170] Referring again to FIG. 18, the paste-on-pad area measurement ofstep 1830 is a straightforward measurement of the amount of paste foundwithin a slightly enlarged region of interest surrounding a pad. This isa 2-dimensional surface area measurement, known to those skilled in theart, and similar to the general paste-in-gap area measurement.Paste-on-pad area measurement is the simplest and most universallyapplied prior art used for paste inspection. It is included here as partof the preferred mode of operation, since it shares the same paste-onlyimage and can be used together with the gap area and bridge analysesdescribed in this invention to provide a more comprehensive set of datafor control of the print process. Otherwise, the measurement of thepaste-on-pad area (step 1830) in the region of interest is independentof the general paste-in-gap area measurement (step 1840) and bridgefeature measurement (step 1850). The paste-in-gap area measurement (step1840) is compared to the user-defined input of maximum amount of pasteallowed in the gap 2215. Thus, steps 1830 and 1840 are used to helpdetect general print defects (described previously) in the region ofinterest. If a general print defect is detected, the substrate beinginspected may be immediately rejected.

[0171] Bridge features in the region of interest are analyzed in step1850. FIG. 21 is a flow chart of a process for the bridge featureanalysis of step 1850, in accordance with an embodiment of theinvention. In FIG. 21, to estimate the significance of bridge-likefeatures a pair of perpendicular axes is assigned to the region ofinterest (step 2100), so that the paste-only images can be firstprojected onto one axis of the region of interest. For example, FIGS.23A-23C are first illustrative run-time image, paste-only image, and aplot of the projected paste only image of solder paste in a gap (the gapis specified as the region of interest for illustrative purposes only),processed in accordance with an embodiment of the invention. FIG. 23A isan illustrative example of a region of interest that is a “run-time”image of paste in a gap (which would correspond to, for example, step1800 of FIG. 18 followed by step 1820 of FIG. 18). FIG. 23B is apaste-only image of the run-time image of FIG. 23A. This is the sliding,or moving, average. A new array is created by smoothing the initialprojected values by the specified kernel size. The resulting numbersrepresent the effective span of the paste at each point along the gap.

[0172] As an aside, note that, in FIG. 23B, the paste coverage in thegap is determined to be 45% in step 2215.

[0173] Referring again to FIGS. 21 and 23A-C, FIG. 23C is a plot with Xand Y-axes corresponding to the dimensions of the gap region pixel. TheY-axis corresponds to the typically longer “non-bridging” axis of thegap, and the X-axis corresponds to the “bridging” or “span” axis of thegap. Of course, these axes may be reversed depending on which is the“bridging” axis. In step 2110, the paste in the region of interest isconverted to a single dimensional array 2305 effectively aligned withone axis of the gap and perpendicular to the span or “bridging” axis.This single dimensional array is created, in one embodiment, by what iscommonly known by those skilled in the art as a simple “projection” ofpixel data along one axis of the region of interest. For example,looking in FIG. 23B along the length of the gap, in this case the Y-axisat about location 38, all of the pixels across the gap span are addedtogether. That total number is divided by 255, the maximum 8-bit graylevel, to get an equivalent span in pixels at this location along theY-axis. This value is plotted along the X-axis in FIG. 23C at a point inthe gap span of about 12 pixels, or about 75% of the way across the 16pixel-wide gap.

[0174] The single dimensional array 2305, or projection, is thensmoothed to filter out small irregularities caused by relatively weak orotherwise insignificant bridging geometry. Smoothing is a process bywhich data points are averaged with their neighbors in a series, such asa time series, or image of pixels, to reduce or “blur” the sharp edgesand abrupt transitions in the raw data. In one embodiment, the smoothingstep 2120 is done by passing a sliding average 2310 (with sizedetermined by user defined/specified parameters; see FIG. 22) over theraw projected data to get a smoother equivalent span at point along theprojection. The sliding average is effectively a one-dimensionalsmoothing kernel. The degree of smoothing is based on the size of thekernel and is analogous to the minimum width of a significant bridge orbridge-like feature. It is not necessary, however, for the size of thesmoothing kernel to be the same as the minimum width of a significantbridge or bridge-like feature. The example in FIG. 23 uses a slidingaverage, or smoothing kernel, of 5 pixels. Taking the average of any 5consecutive entries of the projection as one side of a rectangle, andthe size of the smoothing kernel, or 5, as the other side, a rectangle2310 can be drawn to represent a functionally equivalent bridge featureat each point along the length of the region of interest. The smoothedresults represent the effective span of these “instantaneous” bridgefeatures along the length of the gap, and it is these values, in percentof total gap width, that are checked during step 2140 (FIG. 21), againstuser-defined limits 2225 (FIG. 22).

[0175] For example, in FIG. 23C, the sliding average 2310 has auser-specified width of 5 pixels, which is the same as the minimum widthof bridge feature. The sliding average 2310 is passed along the singledimensional array of projected data from a top to bottom directionrelative to the image shown in FIG. 23C (of course, the direction couldbe reversed, and if the projection of the gap is vertical, then thesliding average could be passed from right to left or left to right).The number of elements used in the sliding average (the size of thesmoothing kernel), together with the smoothed results and with otheruser-specified information, enables a functional estimate of area andsignificant geometry of features along the length of the gap.

[0176] Referring again to FIG. 21, in step 2140, the maximum value of asmoothed single dimensional array is first located. Predeterminedthresholds (see 2225 of FIG. 22, and graphic representation 2320 of FIG.23C), which are also user specified, are then applied to the maximumvalue to determine whether any features “met” or exceed these limits,and if so, a bridge-like defect is detected by definition. For example,in FIG. 23C, the threshold is applied to determine whether any part ofthe smoothed projection exceeds the user-defined limit 2320, or 70% ofthe gap. In this example, 5 smoothed values or “hits” 2330 were found tobe above the threshold 2320, the locations of which are marked with barssimilar to 2310, for illustration. Of course, the threshold and slidingaverage width (in pixels) shown in FIG. 23C is purely illustrative, andother numbers are usable. Based on the application of the thresholds,possible bridges and/or bridge-like features are identified (step 2140)and returned to step 1850 of FIG. 18.

[0177]FIGS. 24 and 25 provide additional examples of embodiments of theinvention, showing application of the smoothing and thresholding asdescribed in FIG. 21. FIGS. 24A-24D are second illustrative run-time,paste-only, region of interest, and plot of projected paste-only imagedata, respectively, of solder paste in a gap, processed in accordancewith an embodiment of the invention. In FIG. 24D, the sliding averageused is 10 pixels, and the double line 2410 in FIG. 24D shows a plot ofthe single dimensional array 2405 after smoothing has been applied. InFIG. 24D, it is seen that a single feature meets the requirement ofbeing classified, by definition, as a “bridge like” defect, where themaximum smoothed value is above the user-defined limit.

[0178]FIGS. 25A-25C are third illustrative run-time, paste-only, andprojected paste only images of solder paste in a gap, processed inaccordance with an embodiment of the invention. In FIG. 25C, the minimumwidth of a bridge or bridge-like feature is 10 pixels and theuser-defined threshold is 70%. These user-defined parameters are thesame as in FIG. 24. A relatively substantial solder bridge is visible inFIGS. 25A and 25B. In FIG. 25C, the sliding average extends beyond theuser-defined threshold, and does so over a relatively large length ofthe gap at the 70% threshold line. This graphically illustrates thepresence of a strong bridge-like defect with many smoothed valuesexceeding the threshold, although only one, the maximum value, isrequired to indicate a bridge-like defect.

[0179] In at least one embodiment of the invention, the sliding averagecan be modified to provide similar sliding root mean square (RMS)output, where data points along the projection are squared before thelocal mean (sliding average) is calculated. The “root” of these “meansquares” is nearly identical to the simple sliding average values.However, the sliding average may be more advantageous because itrequires minimal calculation.

[0180] Referring briefly again to FIG. 18, after the analysis of step1850 is complete, the results can be compared against predetermined(such as user defined) process limits (step 1860), with the resultantdata stored (step 1870) for possible modifications to the screenprinting/solder paste placement process. Whether or not process limitsare exceeded or a defect is reported at any specific site, the data canbe appropriately filtered and used to monitor lesser trends foreffective control of the print process (step 1880), as will beappreciated by those skilled in the art. For example, the minimum,maximum, and average amount of paste found in gaps between pads can besaved after inspection is complete (e.g., inspection of a givensubstrate). The same measurements can be saved for span measurements ofbridge-like features. This data not only enables trend analyses foreffective process control, it provides a means to fine tune detectionparameters based on historical performance and realistic productionrequirements.

[0181] The user specified inputs of FIG. 22 are, in at least oneembodiment, partially dependent on features of the substrates, such asvariations in gap size, pad size, and pad position. For example, in theexample embodiments of FIGS. 23, 24, and 25, it also can be seen thatthe user specified minimum width of a bridge/bridge-like feature canvary depending features such as, the length and width of the gap and onthe user specified threshold. This is because the inherent surfacetension of substances such as molten solder paste can cause the solderpaste to “pull back” and not extend across a gap if the width of theprojection is small as compared to the size of the gap, even if theprojection extends more than halfway across a gap. Thus, for the examplegap span of 9 pixels in FIG. 25C, a larger minimum width of possiblebridge/bridge like feature (i.e., 10 pixels) is specified. So, forexample, a feature having a width of 9 pixels might be permitted toextend up to 90% of the width of the gap in the example of FIG. 25C,because the tendency of the solder paste is to pull back and not“bridge”.

[0182] In contrast, for the example gap span of FIG. 23C (i.e., 16pixels), the minimum width of a bridge feature is 5 pixels. In thisexample, if the bridge feature extends across 70% or more of the span ofthe gap, it is unlikely to “pull back” and more likely to “bridge.”

[0183]FIG. 26 is an illustration showing the effect of variations in padsize on gap size, in accordance with an embodiment of the invention, andFIG. 27 is an illustration showing the effect of variations in padposition on gap size, in accordance with an embodiment of the invention.As FIGS. 26 and 27 illustrate, the gap size can vary depending on thepad size and pad placement. Because at least some embodiments of theinvention permit user specified inputs for parameters such as maximumspan of a significant bridge feature across a gap, size of slidingaverage window, etc. (see FIG. 22), the systems and methods of theinvention advantageously may be quickly adapted to substrates of varyingsizes, with varying pad sizes and placements.

[0184]FIGS. 28-30 are representative illustrations showing types ofbridges and bridge-like features that may be detectable using oneembodiment of the invention. All bridge-like features are preciselydrawn to cover exactly 6%, 18%, and 36% of the total gap area in FIGS.28, 29, and 30, respectively, regardless of shape. Only the geometry ofbridge-like features is changed to demonstrate how various shapes affectthe probability that a bridge defect will occur later in a processcalled “reflow”, where the solder paste is heated to a molten state,thus enabling redistribution of the solder deposit via surface tension.Of course, naturally occurring bridge-like features would be morerandomly shaped, but they would share most of the basic characteristicsshown in these illustrations. Only FIG. 28 is described in detail in thefollowing paragraphs, although the same descriptions apply to likefigures in FIGS. 29 and 30.

[0185] In FIG. 28, item 2800 shows a bridge-like paste feature thatextends the full span of the gap between two adjacent pad deposits,making contact with both, in what can be called “classic” bridgegeometry. The bridge feature 2802 has uniform thickness across the fullspan of the gap, with no part any more likely to break and “pull back”via surface tension during subsequent reflow operations. During reflowoperations, surface tension would create a tendency to “wick” the moltensolder, previously a solder paste, back toward junctions 2804 and 2806,both tending to broaden to the point of contact 2804 and 2806, andthinning the center of the bridge feature. Eventually, under certainconditions, the feature may become thin enough to break and pull backwith each portion migrating toward respective “junctions” 2804 and 2806.

[0186] The maximum value produced by the sliding average of theprojected data, as described in this invention, is dependent on the sizeof the sliding average, i.e., the smoothing kernel. In a preferredmethod, the size of the sliding average is determined by a user-defined“sensitivity” setting. For a specific kernel size, or given sensitivity,the size and shape of the bridge feature determines how much of aneffect the smoothing kernel will have on the projected data and thus themaximum value after smoothing. The maximum value can be considered theeffective span of features with at least enough “bulk” or “power” tosurvive the smoothing operation. Referring briefly again to FIG. 24, anactual bridge feature can be seen in 24B that is similar in relativesize and shape to the bridge example 2802, so it will be used here toshow, in actual practice, the effect of smoothing similarly shapedbridge-like features. Both features span 100% of the gap. FIG. 24D showsa plot 2410 of the smoothed data with a maximum value of about 85% atthe bridge location. The feature is flagged as a defect if the maximumsmoothed span, in this case 85%, is above the user-defined limit.

[0187]FIG. 28 shows a uniform bridge feature 2810 making contact withonly one pad deposit at 2814. In this case a “break” 2812 is alreadypresent, therefore the probability of “pull back” is greater in 2810than in 2800, since surface tension favors only one side, with nocounteraction from the opposite side. Note that the point of contact2814 with the pad deposit is slightly larger than that of junction 2804,as required to maintain the same 6% gap coverage for all bridge examplesshown in FIGS. 28A-F. Given the same bridge “sensitivity”, the effect ofsmoothing the projected data of 2810 would be similar to the previousexample 2800, since they have nearly the same uniform thickness, but theeffective span (i.e. maximum smoothed value) would be less than in theprevious example. Again, the feature is flagged as a defect if themaximum smoothed span is above the user-defined limit.

[0188]FIG. 28, item 2820, also has a “break” 2822, similar to 2812, butlocated mid-span.

[0189]FIG. 28, item 2830, is similar to item 2800 in that contact ismade on both sides of the gap. Shape is the main difference here with abroader base of contact 2834 on one side of the gap, and a much smallerpoint of contact 2836 on the other. The point 2836 would provide littleof the “wicking” tendencies that the much larger base 2834 wouldprovide. Also, upon similarly smoothing the projected data of bridgefeatures 2832 and 2802, the effective span (maximum of smoothed values)of the triangle shaped feature 2832 would be less than that of theuniformly shaped 2802. The difference in effective span correctlyimplies that 2802 has more significant bridge potential than does 2832,and although both reported spans must be checked against theuser-defined span limits, feature 2832 is less likely to be flagged as adefect than 2802. FIG. 29 includes items 2900, 2910, 2920, 2930, 2940,and 2950. FIG. 30 includes items 3000, 3010, 3020, 3030, 3040, and 3050.FIGS. 29 and 30 present bridge-like features in nearly identical formatas in FIG. 28 with one notable difference. While all bridge featuresshown in FIG. 28 cover exactly 6% of the gap, in FIG. 29 they cover 18%of the gap, and in FIG. 30, 36%. Upon smoothing the projected data oflike bridge features in FIGS. 28, 29, and 30, using the same kernel, theeffective span of the larger deposits would be greater. Again, thedifference in effective span correctly implies that relatively largerdeposits have more significant bridge potential than do smallerdeposits, and although all reported spans must be checked against theuser-defined span limits, larger ones are more likely to be flagged as adefect. In addition, general paste-in-gap area must also be checkedagainst the user-defined limits, and while these are typically set tocatch gross defects that may also have significant bridge potential,here too the larger deposits are more likely to be flagged as a defectthan the smaller ones.

[0190]FIG. 31 is a representative illustration of other types of screenprinting/solder paste printing defects that may be detectable inaccordance with at least some embodiments of the invention. FIG. 31,item 3100 shows a common print defect due to poor general pastealignment. In this case reported paste-in-gap values would rise with thedegree of misalignment, as would the reported span of paste across thegap. FIG. 31, item 3110 shows the effect of gross misalignment. For thepurpose of estimating future bridge potential, this invention wouldcorrectly estimate the increased potential of a bridge related defect asa function of paste alignment.

[0191]FIG. 31, items 3130 and 3140, show multiple unique defects wherelength of span and shape of the feature determine defect potential. Initem 3130 both features extend to mid-gap, although from opposite sides,and both cover the same amount of gap area. This method of thisinvention operates on both features simultaneously and, as firstdemonstrated in FIG. 28, the rectangular feature would correctly producethe largest gap span after smoothing operations. The same is true forsimilar features in item 3140, although the maximum reported span wouldbe greater, and thus the bridging potential, in this example.

[0192]FIG. 31, items 3120 and 3150, show slight and gross over-printrespectively. In both cases, the effective span of paste across the gapis greatest near the center of the gap. Only the cumulative effect ofpaste in the bridging direction is important. In this way, the simpleprojection and sliding average method used in this invention is able tocorrectly determine that item 3150 has greater bridging potential thandoes item 3120, based on the difference in reported effective span.Also, the reported paste-in-gap area would be greater for item 3150 thanfor item 3120, thus item 3150 would be first to correctly indicate apaste-in-gap defect on this account as well.

[0193]FIGS. 28-31 and associated descriptions demonstrate the methodsused in this invention to correctly estimate the effective “bridgingpotential” of a paste deposit, based on user-defined “sensitivity”parameters, as well as to detect and flag bridge defects that mayadversely affect subsequent processes, based on user-defined limits.

[0194] It has been found that the methods for detection of defects suchas bridges is more successful when accurate and reliable paste detectionmethods are used to separate paste from background. Advantageously, thetexture-based paste detection method disclosed herein and in applicationSer. No. 09/304,699 may be combined with the bridge analysis techniquedisclosed herein to provide useful and reliable measurement of bridgecharacteristics that are relevant to the board assembly process.

[0195] In describing the embodiments of the invention illustrated in thefigures, specific terminology is used for the sake of clarity. However,the invention is not limited to the specific terms so selected, and eachspecific term at least includes all technical and functional equivalentsthat operate in a similar manner to accomplish a similar purpose.

[0196] As those skilled in the art will recognize variations,modifications, and other implementations of what is described herein canoccur to those of ordinary skill in the art without departing from thespirit and the scope of the invention as claimed. Further, virtually anyaspect of the embodiments of the invention described herein can beimplemented using software, hardware, or in a combination of hardwareand software.

[0197] It should be understood that, in the Figures of this application,in some instances, a plurality of system elements or method steps may beshown as illustrative of a particular system element, and a singlesystem element or method step may be shown as illustrative of aplurality of a particular systems elements or method steps. It should beunderstood that showing a plurality of a particular element or step isnot intended to imply that a system or method implemented in accordancewith the invention must comprise more than one of that element or step,nor is it intended by illustrating a single element or step that theinvention is limited to embodiments having only a single one of thatrespective elements or steps. In addition, the total number of elementsor steps shown for a particular system element or method is not intendedto be limiting; those skilled in the art will recognize that the numberof a particular system element or method steps can, in some instances,be selected to accommodate the particular user needs.

[0198] Although the invention has been described and pictured in apreferred form with a certain degree of particularity, it is understoodthat the present disclosure of the preferred form, has been made only byway of example, and that numerous changes in the details of constructionand combination and arrangement of parts may be made without departingfrom the spirit and scope of the invention as hereinafter claimed.

What is claimed is:
 1. A method of inspecting a stencil having aperturesthrough which a substance is deposited onto an electronic substratecomprising: depositing the substance through the stencil and onto thesubstrate; capturing a first image of the stencil after the deposit ofthe substance and detecting variations in texture of the substance inthe first image; capturing a second image of the electronic substratehaving the substance on its surface and detecting variations in textureof the substance in the second image; defining a region of interest inthe first image and in the second image to determine whether at leastone feature exists in the region of interest; measuring a first span ofthe at least one feature in the region of interest in the first imageand a second span of the at least one feature in the region of interestin the second image; and correlating the first span of the at least onefeature and the second span of the at least one feature to determinewhether a threshold span of the at least one feature has been reached.2. The method of claim 1 wherein the at least one feature includes atleast one of a short circuit, a bridge-like feature, a bridge, an excessquantity of the substance, and a stray area of the substance.
 3. Themethod of claim 1 further comprising altering a process by which thesubstance is deposited on the electronic substrate when the thresholdspan of the at least one feature has been met or exceeded.
 4. The methodof claim 1 wherein the step of correlating is accomplished in accordancewith at least one detection parameter.
 5. The method of claim 4 furthercomprising computing, for each feature in the region of interest, anarea and geometry of the at least one feature, the computationaccomplished using at least one detection parameter.
 6. The method ofclaim 5 further comprising determining, based on the area and geometry,that the at least one feature in the image requires a corrective action.7. The method of claim 1 wherein the electronic substrate is a printedcircuit board.
 8. The method of claim 1 wherein the substance includessolder paste.
 9. A system for dispensing solder paste at a predeterminedlocation through a stencil on a substrate comprising: a dispenser thatdispenses material through the stencil and on the substrate; a visionsystem electrically coupled to the controller to capture images of thestencil; a controller for maintaining the operations of the dispenser;and a processor in electrical communication with the controller, theprocessor being programmed to: perform texture-based recognition of animage of a solder paste deposit located on the stencil, define a regionof interest within the image of solder paste, the defined region ofinterest having a first axis, wherein a set of pixels in the image liealong the axis; compute, for each pixel along the axis, a sum of all thepixels in the region of interest that are in perpendicular alignmentwith the respective pixel along the axis; represent the sums of eachpixel along the axis as a single dimensional array perpendicular to theaxis; and evaluate the single dimensional array to determine whether anydefects exist in the region of interest.
 10. The system of claim 9wherein the substrate is a circuit board.
 11. The system of claim 9wherein the defects include at least one of a short circuit, a bridge,an excess quantity of solder paste and a stray area of solder paste. 12.The system of claim 9 wherein the processor is further programmed tocompute, for each defect in the region of interest, an area and geometryof the defect, using a detection parameter and the single dimensionalarray.
 13. The system of claim 9 wherein the processor is furtherprogrammed to perform texture-based recognition of a solder pastedeposit located on the substrate and compare solder paste deposits onthe substrate with solder paste deposits on the stencil.
 14. A method ofdetecting a defect in a substance deposited through a stencil and onto asubstrate, comprising: capturing an image of the stencil; detectingvariations in texture in the image to determine a location of thesubstance on the stencil; defining a region of interest in the image,the defined region of interest having a first axis, wherein a set ofpixels in the image lie along the axis; computing, for each pixel alongthe axis, a sum of all the pixels in the region of interest that are inperpendicular alignment with the respective pixel along the axis;representing the sums of each pixel along the axis as a singledimensional array perpendicular to the axis; and evaluating the singledimensional array to determine whether any defects exist in the regionof interest.
 15. The method of claim 14 wherein the substance comprisessolder paste.
 16. The method of claim 14 wherein the defect comprises atleast one of a solder bridge, a bridge-like feature, or an excess pastefeature.
 17. The method of claim 14 wherein the stencil includes firstand second apertures, separated by a distance, through which the solderpaste is deposited and the defect comprises the existence of solderpaste spanning at least a portion of the distance between the first andsecond apertures.
 18. The method of claim 14 further comprising applyinga rule to determine whether the defect should be classified as a solderbridge.
 19. The method of claim 14 further comprising actuating astencil wipe procedure when a defect exists in the region of interest.20. A method of inspecting a stencil having apertures through which asubstance is deposited onto an electronic substrate comprising:depositing the substance through the stencil and onto the substrate;capturing a first image of the stencil after the deposit of thesubstance and detecting variations in texture of the substance in thefirst image; capturing a second image of the electronic substrate havingthe substance on its surface and detecting variations in texture of thesubstance in the second image; defining a region of interest in thefirst image and in the second image to determine whether at least onefeature exists in the region of interest; measuring a first span of theat least one feature in the region of interest in the first image and asecond span of the at least one feature in the region of interest in thesecond image; correlating the first span of the at least one feature andthe second span of the at least one feature to determine whether athreshold span of the at least one feature has been reached; andactuating a stencil wipe to clean a surface of the stencil when it isdetermined that the threshold span has been reached.
 21. A method ofdispensing material at predetermined locations through a stencil andonto an electronic substrate, the method comprising: dispensing thematerial through the stencil and onto the substrate; performingtexture-based recognition of a predetermined location of the material onthe stencil; determining whether there is at least one feature in thepredetermined location on the stencil; comparing the at least onefeature on the stencil with a position of the substance on the substrateto determine whether the at least one feature is a defect; and actuatinga stencil wipe procedure when the at least one feature is determined tobe a defect.
 22. The method of claim 21 wherein the at least one featureincludes at least one of a defect, a short circuit, a bridge-likefeature, a bridge, an excess quantity of the substance and a stray areaof the substance.
 23. The method of claim 21 wherein the electronicsubstrate is a printed circuit board.
 24. The method of claim 21 whereinthe substance includes solder paste.
 25. The system of claim 24 furthercomprising performing texture-based recognition of a solder pastedeposit located on the substrate and comparing solder paste deposits onthe substrate with solder paste deposits on the stencil.